package cn.edu.cuit.filter;

import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;

public class MyServlet extends HttpServlet {
	public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		
		// 将输出置为html
		response.setContentType("text/html;charset=utf-8");
		// 将用于过滤的Servlet组件
		// 仅仅向客户端输出一个标记字符串
		response.getWriter().write("Hello MyServlet <br>");
	}

	public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// 从业务架构的角度，也可以认为是doGet首先对doPost进行了过滤
		doGet(request, response);
	}
}
